local skel = fk.CreateSkill{
  name = "#sj9__mingyifu_choose",
}

Fk:loadTranslationTable{
  ["#sj9__mingyifu_choose"] = "命易覆",
  ["#sj9__mingyifu_num"] = "命易覆：你可以令一名角色将手牌调整至%arg",
  ["#sj9__mingyifu_target"] = "命易覆：你可以令 %dest 将手牌调整至%arg",
}

skel:addEffect("active", {
  prompt = function (self, player, selected_cards, selected_targets)
    if self.interaction.data and #selected_targets == 1 then
      return "#sj9__mingyifu_target::"..selected_targets[1].id..":"..self.interaction.data
    end
    return self.interaction.data and "#sj9__mingyifu_num:::"..self.interaction.data or "#sj9__mingyifu"
  end,
  interaction = function (self, player)
    return UI.ComboBox{
      choices = {tostring(self.extra_data.max),tostring(self.extra_data.min)},
    }
  end,
  card_filter = Util.FalseFunc,
  target_filter = function (self, player, to_select, selected, selected_cards)
    return #selected == 0 and to_select:getHandcardNum() ~= tonumber(self.interaction.data)
  end,
  target_num = 1,
  min_target_num = 1,
  max_target_num = 1,
})

return skel